using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Activities.Tracking;
using AppToolkit.WF.Utils;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics.Contracts;

namespace AppToolkit.WF.Services
{
    public class WorkflowState : INotifyPropertyChanged
    {
        private Guid guid;

        public WorkflowState(Guid guid)
        {
            Contract.Requires<ArgumentException>(guid != Guid.Empty, "guid");
            this.guid = guid;
        }

        #region Property State
        private string _State;

        public string State
        {
            get
            {
                return _State;
            }
            set
            {
                if (_State != value)
                {
                    _State = value;
                    OnPropertyChanged("State");
                }
            }
        }
        #endregion

        #region Property Current
        private int _Current;

        public int Current
        {
            get
            {
                return _Current;
            }
            set
            {
                if (_Current != value)
                {
                    _Current = value;
                    OnPropertyChanged("Current");
                }
            }
        }
        #endregion

        #region Property Maximum
        private int _Maximum;

        public int Maximum
        {
            get
            {
                return _Maximum;
            }
            set
            {
                if (_Maximum != value)
                {
                    _Maximum = value;
                    OnPropertyChanged("Maximum");
                }
            }
        }
        #endregion

        #region INotifyPropertyChanged Members
        protected void OnPropertyChanged(string propertyName)
        {
            if (null != PropertyChanged)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        #endregion
    }
}
